<?php
class AppController extends Controller {
	var $components = array('Auth', 'Session');
	var $uses = array('Setting');
	
	function beforeFilter() {
		//parent::beforeFilter();
		$this->Auth->authorize= 'controller';
		$this->Auth->allow('register','securimage','login','index');
		$this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');
		$this->Auth->logoutRedirect = array('controller' => 'public', 'action' => 'index');
		$this->Auth->loginRedirect = array('controller' => 'public', 'action' => 'index');
	}

	function isAuthorized()
	{
		return TRUE;
	}

}
?>
